package com.youxin.busfoundation.enums;

/**
 * 注册货币单位
 * @author yingde.cao
 *
 */
public enum RegUnitType {
	RMB(1,"人民币"),
	DOLLAR(2,"美元"),
	HKDOLLAR(3,"港元"),
	EUR(4,"欧元"),
	JPY(5,"日元"),
	SGADOLLOR(6,"新加坡元"),
	AUSDOLLOR(7,"澳元"),

	;
	
	public int getValue() {
		return value;
	}
	
	private int value;
	private String name;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setValue(int value) {
		this.value = value;
	}

	private RegUnitType(int value,String name) {
		this.value = value;
		this.name=name;
	}
	
	public static RegUnitType valueOf(int val)
	{			
		for(RegUnitType m : RegUnitType.values()) 
		{
			if(val==m.getValue())
				return m;
	    }
		return RegUnitType.RMB;
	}
}
